<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "history_user_template_set".
 *
 * @property int $id
 * @property int $uid_operate 操作账户ID
 * @property int $uid 受操作账户ID
 * @property int $direction 1为新增，2为切换
 * @property int $template_id_new 新的手续费模板ID
 * @property int $template_id_old 老的手续费模板ID，type=1时为0
 * @property int $time
 * @property string $ip IP信息
 * @property string $ua user_agent信息
 */
class HistoryUserTemplateSet extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'history_user_template_set';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid_operate'], 'required'],
            [['uid_operate', 'uid', 'direction', 'template_id_new', 'template_id_old', 'time'], 'integer'],
            [['ua'], 'string'],
            [['ip'], 'string', 'max' => 16],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid_operate' => '操作账户ID',
            'uid' => '受操作账户ID',
            'direction' => '1为新增，2为切换',
            'template_id_new' => '新的手续费模板ID',
            'template_id_old' => '老的手续费模板ID，type=1时为0',
            'time' => 'Time',
            'ip' => 'IP信息',
            'ua' => 'user_agent信息',
        ];
    }
}
